package com.eliaukjq.xunlianying;

/**
 * @Author : 佩萁
 * Description :
 * @Create : 2024/7/10 - 16:20
 */
public class FinalParameterExample {
    interface Printer {
        void print();
    }

    public static void printMessage(final String message) {
        Printer printer = new Printer() {
            @Override
            public void print() {
                System.out.println(message);
            }
        };
        printer.print();
    }

    public static void main(String[] args) {
        printMessage("Hello,Final World!");
    }
}
